POV-Ray : Newsgroups : povray.advanced-users : distinguishing types in scene language : Re: distinguishing types in scene language Server Time
3 May 2024 04:05:59 EDT (-0400)
  Re: distinguishing types in scene language  
From: Warp
Date: 25 Sep 2000 04:23:32
Message: <39cf0b83@news.povray.org>
In povray.text.scene-files Thorsten Froehlich <thorsten@trf.de> wrote:
: Regarding your question, there is no function to determine the type.
: However, as the result of any function in POV-Ray is deterministic, you
: should always know which variable type a variable is.  For a printing macro,
: you would then just pass that information along with the variable.

  I don't think it would be a bad idea to be able to get the variable type
from a variable instance (doesn't it carry it along anyways?).
  I don't even think that making a set of functions returing a bool value for
this would be hard. For example:
  isvector()
  isreal()
  isstring()
  ...

  For exampe isvector() would return true if the parameter is a vector, else
false.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.